<?xml version="1.0" encoding="utf-8"?>
<openerp>
	<data>
		<record id="view_invoice_customer_applico" model="ir.ui.view">
			<field name="name">account.invoice.customer.pay.applico</field>
			<field name="model">account.invoice</field>
			<field name="inherit_id" ref="account_voucher.view_invoice_customer"/>
			<field name="arch" type="xml">
				<button name="invoice_pay_customer" attrs="{'invisible': ['|', ('state','!=','open'), ('sent','=',True)]}" position="replace">
					<button name="invoice_pay_customer" type="object" string="Register Payment"
						invisible="1" groups="base.group_user"/>
				</button>
				<button name="invoice_pay_customer" attrs="{'invisible': ['|', ('state','!=','open'), ('sent','=',False)]}" position="replace">
					<button name="invoice_pay_customer" type="object" string="Register Payment"
						invisible="1" class="oe_highlight" groups="base.group_user"/>
				</button>
			</field>
		</record>


		<record id="view_invoice_supplier_applico" model="ir.ui.view">
			<field name="name">account.invoice.supplier.pay.applico</field>
			<field name="model">account.invoice</field>
			<field name="inherit_id" ref="account_voucher.view_invoice_supplier"/>
			<field name="arch" type="xml">
				<button name="invoice_pay_customer" position="replace">
					<button name="invoice_pay_customer" type="object" invisible="1" string="Pay" states="open" class="oe_highlight" groups="base.group_user"/>
				</button>
			</field>
		</record>

	</data>
</openerp>
